package com.neusoft.service;

import java.util.List;

import com.neusoft.model.BooksModel;
import com.neusoft.model.entity.Books;
import com.neusoft.model.vo.BooksModelVO;

public interface BooksService {

	/**
	 * 
	 * @Description: 
	 * @param booksModelVO
	 * @return Books
	 */
	BooksModel findBooksByISBN(BooksModelVO booksModelVO);
	
	/**
	 * 
	 * @Description: BookName模糊查询
	 * @param booksModelVO
	 * @return BooksModel
	 */
	BooksModel findBooksByBookName(BooksModelVO booksModelVO);
	
	/**
	 * 
	 * @Description: 
	 * @param booksModelVO
	 * @return BooksModel
	 */
	BooksModel findBooksByAuthor(BooksModelVO booksModelVO);
	
	/**
	 * 
	 * @Description: 标签主题精确查询
	 * @param booksModelVO
	 * @return BooksModel
	 */
	BooksModel findBooksByTag(BooksModelVO booksModelVO);
	
	/**
	 * 
	 * @Description: 根据ISBN，BookName，Author，Tag查询书籍
	 * @param booksModelVO
	 * @return BooksModel
	 */
	BooksModel findBooksByVo(BooksModelVO booksModelVO);
	
	/**
	 * 
	 * @Description: 插入一本书
	 * @param book void
	 */
	void inseartBook(Books book);

	
	/**
	 * 查找所有书籍信息
	 * @return
	 */
	BooksModel findAllBooks();
	

	/**
	 * 通过图书ID修改图书信息
	 * @return
	 */
	void updateBooksbyID(Books record);
	
	/**
	 * 
	 * @Description: 返回easyui的分页查询数据
	 * @param booksModelVO
	 * @param page   第几页
	 * @param rows   
	 * @return BooksModel
	 */
	BooksModel findBooksByVoEU(BooksModelVO booksModelVO,int page, int rows );
	
	/**
	 * 
	 * @Description: 计算books的总数量
	 * @return long
	 */
	int countBooks();
	
	/**
	 * 
	 * @Description: 根据页面传来的id查询
	 * @param booksModelVO
	 * @return List<Books>
	 */
	List<Books> findBooksByActiveId(BooksModelVO booksModelVO);
	 
	Books findBooksByID(BooksModelVO booksModelVO);
	BooksModel findBooksByPublish(BooksModelVO booksModelVO);
	BooksModel findBooksByCallno(BooksModelVO booksModelVO);
	
	void updateStatus(BooksModel booksModel);
	List<BooksModel> distinguish(BooksModel booksModel);
	
	 void updateStatusToTwo(int id);
		/**
		 * 通过主键查找书籍
		 * @param id
		 * @return
		 */
		Books findBooksbyID(Integer id);
		
		/**
		 * 插入书籍信息
		 * @param book
		 */
		void insertBooks(BooksModelVO booksModelVO);

		/**
		 * 
		 * @param bookID
		 */
		void deleteBooksbyID(int bookID);

}
